// 用于主页面通用内容
import Main from '@/views/main.vue';
// 用于二级页面的内容
import SubMain from '@/views/sub-main.vue';

export default {
	path: '/statistics',
	name: 'statistics',
	redirect: '/statistics/overall/overview',
	meta: {
		title: '统计',
		icon: 'md-podium'
	},
    component: Main,
    children: [
		{
			path: 'overall',
			name: 'statistics_overall',
			component: SubMain,
			children: [
				{
					path: 'overview',
		        	name: 'statistics_overall_overview',
		        	meta: {
		        		title: '统计概况'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/overall/overview.vue'], resolve)
			        }
				},
				{
					path: 'realtime',
		        	name: 'statistics_overall_realtime',
		        	meta: {
		        		title: '实时数据'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/overall/realtime.vue'], resolve)
			        }
				}
			]
		},
		{
			path: 'goods',
			name: 'statistics_goods',
			meta: {
				title: '商品'
			},
			component: SubMain,
			children: [
				{
					path: 'overview',
		        	name: 'statistics_goods_overview',
		        	meta: {
		        		title: '商品概况'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/goods/overview.vue'], resolve)
			        }
				},
				{
					path: 'analysis',
		        	name: 'statistics_goods_analysis',
		        	meta: {
		        		title: '单品分析'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/goods/analysis.vue'], resolve)
			        }
				}
			]
		},
		{
			path: 'user',
			name: 'statistics_user',
			meta: {
				title: '用户'
			},
			component: SubMain,
			children: [
				{
					path: 'user',
		        	name: 'statistics_user_user',
		        	meta: {
		        		title: '用户分析'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/user/user.vue'], resolve)
			        }
				},
				{
					path: 'flow',
		        	name: 'statistics_user_flow',
		        	meta: {
		        		title: '流量分析'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/user/flow.vue'], resolve)
			        }
				}
			]
		},
		{
			path: 'route',
			name: 'statistics_route',
			meta: {
				divider: true
			},
			component: SubMain,
			children: [
				{
					path: 'live',
		        	name: 'statistics_route_live',
		        	meta: {
		        		title: '直播数据'
		        	},
		        	component: resolve => {
			        	require(['@/views/statistics/route/live.vue'], resolve)
			        }
				}
			]
		}
    ]
}
